import less from 'less';

const themeList = [
  { '@primary-color': '' },
  { '@primary-color': 'red' },
  { '@primary-color': 'green' },
  { '@primary-color': 'blue' },
  { '@primary-color': 'yellow' },
  { '@primary-color': 'pink' },
  { '@primary-color': 'black' },
  { '@primary-color': 'white' },
  { '@primary-color': 'brown' },
  { '@primary-color': 'cyan' },
  { '@primary-color': 'darkcyan' },
];

export const setTheme = () => {
  // document.body.style.setProperty('--primary-color', themeList[Math.ceil(Math.random() * 10)]['@primary-color']);
  console.log(less.options, less.options.modifyVars);
  less.modifyVars(themeList[Math.ceil(Math.random() * 10)]).then((res) => {
    console.log('换肤');
  });
};
